Twitter in India & the JNU Protests
Scraping Twitter
Preparing a Network Analysis
Analysing the #JNUProtest Network
Questions
29 November 2019
Twitter in India & the JNU Protests
Scraping Twitter
Preparing a Network Analysis
Analysing the #JNUProtest Network
Questions
Access to the Twitter API gives you an access token that needs to be loaded into R when scraping
load("twittertoken.RDa")
library(rtweet)
search <- search_tweets(q = "#JNUProtests OR EmergencyinJNU",
n = 1000,
token = twitter_token)
View(search)
library(igraph) library(graphTweets)
load("JNUProtest_search.RDa")
search %>%
gt_edges(screen_name, mentions_screen_name) %>%
gt_nodes() %>%
gt_graph() -> mentions_graph
Gephi (https://gephi.org/) is a great, free and easy to use tool for netowrk visualisation and analysis
Standard R dataformat is not supported, we have to export our Graph
library(rgexf)
nodes_df <- data.frame(ID = c(1:vcount(mentions_graph)),
NAME = V(mentions_graph)$name)
edges_df <- as.data.frame(get.edges(mentions_graph,
c(1:ecount(mentions_graph))))
edges_df$n <- E(mentions_graph)$n
write.gexf(nodes = nodes_df[1:2],
edges = edges_df[1:2],
edgesWeight = edges_df$n,
defaultedgetype = "directed",
output = "workshop_mentions_graph_2.gexf")
Send us an email to
erikbecker@hotmail.de
or
tim.koenig@wzb.eu
Bennett, W. Lance, und Barbara Pfetsch. 2018. „Rethinking Political Communication in a Time of Disrupted Public Spheres“. Journal of Communication 68 (2): 243–53. https://doi.org/10.1093/joc/jqx017.
Bruns, Axel, und Jean Burgess. 2012. „Researching News Discussion on Twitter“. Journalism Studies 13 (5–6): 801–14. https://doi.org/10.1080/1461670X.2012.664428.
Luke, Douglas A. 2015. A User’s Guide to Network Analysis in R. Use R! Springer International Publishing. https://doi.org/10.1007/978-3-319-23883-8.
Maireder, Axel, und Stephan Schlögl. 2014. „24 Hours of an #outcry: The Networked Publics of a Socio-Political Debate“. European Journal of Communication 29 (6): 687–702. https://doi.org/10.1177/0267323114545710.
Meraz, Sharon, und Zizi Papacharissi. 2013. „Networked Gatekeeping and Networked Framing on #Egypt“. The International Journal of Press/Politics 18 (2): 138–66. https://doi.org/10.1177/1940161212474472.